#include "../cse452.h"
#include "../sceneview/MyScene.h"

bool MyScene::selectNode(int x, int y) {
    if (!isLoaded)
        return false;
    // ToDo: pick which node is under the given pixel
    // by tracing a ray into the world
    return false;
}

void MyScene::moveSelectedNode( const Matrix4 &mat )
{
    // ToDo: Move the selected node
}

Vector3 MyScene::makeRay(double x, double y){
	Point3 screenPoint = Point3( ((x + 0.5)*2/getWidth()-1), 
		(1 - (y + 0.5) * 2 / getHeight()), 
		-1);
	return getCamera().getCameraToWorld() * (screenPoint - Point3(0,0,0));
}